//电子邮件puhalskijsemen@gmail.com
//源码网站 开vpn全局模式打开 http://web3incubators.com/
//电报https://t.me/gamecode999
var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(e, t) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(e, t) {
        e.__proto__ = t;
    } || function(e, t) {
        for (var o in t) t.hasOwnProperty(o) && (e[o] = t[o]);
    })(e, t);
}, function(e, t) {
    function n() {
        this.constructor = e;
    }
    o(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, 
    new n());
}), a = this && this.__decorate || function(e, t, o, n) {
    var r, a = arguments.length, i = a < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, o) : n;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) i = Reflect.decorate(e, t, o, n); else for (var c = e.length - 1; 0 <= c; c--) (r = e[c]) && (i = (a < 3 ? r(i) : 3 < a ? r(t, o, i) : r(t, o)) || i);
    return 3 < a && i && Object.defineProperty(t, o, i), i;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("AudioManager"), s = e("WebManager"), c = e("LoadManager"), l = cc._decorator, d = l.ccclass, u = l.property, p = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.sprite = null, e.nameLabel = null, e.shadow = null, e.great = null, e.greatLabel = null, 
        e.data = null, e.__itemID = null, e;
    }
    return i(e, t), e.prototype.start = function() {}, e.prototype.init = function(e) {
        var t = this;
        (this.data = e).nickname && (5 < e.nickname.length ? this.nameLabel.string = e.nickname.substring(0, 5) + "..." : this.nameLabel.string = e.nickname), 
        e.digg_count && this.greatLabel && (this.greatLabel.string = GA.formatNumber(parseInt(e.digg_count))), 
        e.cover_url && c.default.getInstance().loadImage({
            url: e.cover_url
        }).then(function(e) {
            t.sprite && e instanceof cc.Texture2D ? t.sprite.spriteFrame = new cc.SpriteFrame(e) : cc.log(e);
        }).catch(function(e) {
            console.error(e);
        });
    }, e.prototype.removeGreat = function() {
        this.great.destroy(), this.shadow.destroy(), this.greatLabel.node.destroy();
    }, e.prototype.bind = function() {
        var e = this;
        this.node.on(cc.Node.EventType.TOUCH_END, function() {
            r.default.getInstance().playAudio("按钮2"), s.default.getInstance().sentLog("点击最新视频排行榜内内容"), 
            GA.PA && GA.PA.navigateToVideoView && GA.PA.navigateToVideoView({
                videoId: e.data.video_id
            });
        });
    }, a([ u(cc.Sprite) ], e.prototype, "sprite", void 0), a([ u(cc.Label) ], e.prototype, "nameLabel", void 0), 
    a([ u(cc.Node) ], e.prototype, "shadow", void 0), a([ u(cc.Node) ], e.prototype, "great", void 0), 
    a([ u(cc.Label) ], e.prototype, "greatLabel", void 0), a([ d ], e);
}(cc.Component);

n.default = p;